Optimal. Leaf size=231 \[ \frac {a b^2}{2 \left (a^2-b^2\right )^2 d (b+a \cos (c+d x))^2}-\frac {2 a b \left (a^2+b^2\right )}{\left (a^2-b^2\right )^3 d (b+a \cos (c+d x))}-\frac {\left (a \left (a^2+3 b^2\right )-b \left (3 a^2+b^2\right ) \cos (c+d x)\right ) \csc ^2(c+d x)}{2 \left (a^2-b^2\right )^3 d}+\frac {(2 a-b) \log (1-\cos (c+d x))}{4 (a+b)^4 d}+\frac {(2 a+b) \log (1+\cos (c+d x))}{4 (a-b)^4 d}-\frac {a \left (a^4+8 a^2 b^2+3 b^4\right ) \log (b+a \cos (c+d x))}{\left (a^2-b^2\right )^4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.49, antiderivative size = 231, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {4482, 2916, 12,
1661, 1643} \begin {gather*} \frac {a b^2}{2 d \left (a^2-b^2\right )^2 (a \cos (c+d x)+b)^2}-\frac {2 a b \left (a^2+b^2\right )}{d \left (a^2-b^2\right )^3 (a \cos (c+d x)+b)}-\frac {\csc ^2(c+d x) \left (a \left (a^2+3 b^2\right )-b \left (3 a^2+b^2\right ) \cos (c+d x)\right )}{2 d \left (a^2-b^2\right )^3}-\frac {a \left (a^4+8 a^2 b^2+3 b^4\right ) \log (a \cos (c+d x)+b)}{d \left (a^2-b^2\right )^4}+\frac {(2 a-b) \log (1-\cos (c+d x))}{4 d (a+b)^4}+\frac {(2 a+b) \log (\cos (c+d x)+1)}{4 d (a-b)^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 1643
Rule 1661
Rule 2916
Rule 4482
Rubi steps
\begin {align*} \int \frac {\sec (c+d x)}{(a \sin (c+d x)+b \tan (c+d x))^3} \, dx &=\int \frac {\cot ^2(c+d x) \csc (c+d x)}{(b+a \cos (c+d x))^3} \, dx\\ &=-\frac {a^3 \text {Subst}\left (\int \frac {x^2}{a^2 (b+x)^3 \left (a^2-x^2\right )^2} \, dx,x,a \cos (c+d x)\right )}{d}\\ &=-\frac {a \text {Subst}\left (\int \frac {x^2}{(b+x)^3 \left (a^2-x^2\right )^2} \, dx,x,a \cos (c+d x)\right )}{d}\\ &=-\frac {\left (a \left (a^2+3 b^2\right )-b \left (3 a^2+b^2\right ) \cos (c+d x)\right ) \csc ^2(c+d x)}{2 \left (a^2-b^2\right )^3 d}-\frac {\text {Subst}\left (\int \frac {\frac {a^2 b^4 \left (3 a^2+b^2\right )}{\left (a^2-b^2\right )^3}+\frac {a^2 b^3 \left (7 a^2-3 b^2\right ) x}{\left (a^2-b^2\right )^3}+\frac {a^2 \left (2 a^4-3 a^2 b^2-3 b^4\right ) x^2}{\left (a^2-b^2\right )^3}-\frac {a^2 b \left (3 a^2+b^2\right ) x^3}{\left (a^2-b^2\right )^3}}{(b+x)^3 \left (a^2-x^2\right )} \, dx,x,a \cos (c+d x)\right )}{2 a d}\\ &=-\frac {\left (a \left (a^2+3 b^2\right )-b \left (3 a^2+b^2\right ) \cos (c+d x)\right ) \csc ^2(c+d x)}{2 \left (a^2-b^2\right )^3 d}-\frac {\text {Subst}\left (\int \left (\frac {a (2 a-b)}{2 (a+b)^4 (a-x)}-\frac {a (2 a+b)}{2 (a-b)^4 (a+x)}+\frac {2 a^2 b^2}{\left (a^2-b^2\right )^2 (b+x)^3}-\frac {4 a^2 b \left (a^2+b^2\right )}{\left (a^2-b^2\right )^3 (b+x)^2}+\frac {2 \left (a^6+8 a^4 b^2+3 a^2 b^4\right )}{\left (a^2-b^2\right )^4 (b+x)}\right ) \, dx,x,a \cos (c+d x)\right )}{2 a d}\\ &=\frac {a b^2}{2 \left (a^2-b^2\right )^2 d (b+a \cos (c+d x))^2}-\frac {2 a b \left (a^2+b^2\right )}{\left (a^2-b^2\right )^3 d (b+a \cos (c+d x))}-\frac {\left (a \left (a^2+3 b^2\right )-b \left (3 a^2+b^2\right ) \cos (c+d x)\right ) \csc ^2(c+d x)}{2 \left (a^2-b^2\right )^3 d}+\frac {(2 a-b) \log (1-\cos (c+d x))}{4 (a+b)^4 d}+\frac {(2 a+b) \log (1+\cos (c+d x))}{4 (a-b)^4 d}-\frac {a \left (a^4+8 a^2 b^2+3 b^4\right ) \log (b+a \cos (c+d x))}{\left (a^2-b^2\right )^4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 6.33, size = 703, normalized size = 3.04 \begin {gather*} \frac {a b^2 (b+a \cos (c+d x)) \tan ^3(c+d x)}{2 (-a+b)^2 (a+b)^2 d (a \sin (c+d x)+b \tan (c+d x))^3}+\frac {2 a b (-i a+b) (i a+b) (b+a \cos (c+d x))^2 \tan ^3(c+d x)}{(-a+b)^3 (a+b)^3 d (a \sin (c+d x)+b \tan (c+d x))^3}+\frac {2 i \left (a^5+8 a^3 b^2+3 a b^4\right ) (c+d x) (b+a \cos (c+d x))^3 \tan ^3(c+d x)}{(a-b)^4 (a+b)^4 d (a \sin (c+d x)+b \tan (c+d x))^3}-\frac {i (2 a-b) \text {ArcTan}(\tan (c+d x)) (b+a \cos (c+d x))^3 \tan ^3(c+d x)}{2 (a+b)^4 d (a \sin (c+d x)+b \tan (c+d x))^3}-\frac {i (2 a+b) \text {ArcTan}(\tan (c+d x)) (b+a \cos (c+d x))^3 \tan ^3(c+d x)}{2 (-a+b)^4 d (a \sin (c+d x)+b \tan (c+d x))^3}-\frac {(b+a \cos (c+d x))^3 \csc ^2\left (\frac {1}{2} (c+d x)\right ) \tan ^3(c+d x)}{8 (a+b)^3 d (a \sin (c+d x)+b \tan (c+d x))^3}+\frac {(2 a+b) (b+a \cos (c+d x))^3 \log \left (\cos ^2\left (\frac {1}{2} (c+d x)\right )\right ) \tan ^3(c+d x)}{4 (-a+b)^4 d (a \sin (c+d x)+b \tan (c+d x))^3}+\frac {\left (-a^5-8 a^3 b^2-3 a b^4\right ) (b+a \cos (c+d x))^3 \log (b+a \cos (c+d x)) \tan ^3(c+d x)}{\left (-a^2+b^2\right )^4 d (a \sin (c+d x)+b \tan (c+d x))^3}+\frac {(2 a-b) (b+a \cos (c+d x))^3 \log \left (\sin ^2\left (\frac {1}{2} (c+d x)\right )\right ) \tan ^3(c+d x)}{4 (a+b)^4 d (a \sin (c+d x)+b \tan (c+d x))^3}+\frac {(b+a \cos (c+d x))^3 \sec ^2\left (\frac {1}{2} (c+d x)\right ) \tan ^3(c+d x)}{8 (-a+b)^3 d (a \sin (c+d x)+b \tan (c+d x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.62, size = 196, normalized size = 0.85 Too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 602 vs.
\(2 (223) = 446\).
time = 0.31, size = 602, normalized size = 2.61 \begin {gather*} -\frac {\frac {8 \, {\left (a^{5} + 8 \, a^{3} b^{2} + 3 \, a b^{4}\right )} \log \left (a + b - \frac {{\left (a - b\right )} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )}{a^{8} - 4 \, a^{6} b^{2} + 6 \, a^{4} b^{4} - 4 \, a^{2} b^{6} + b^{8}} - \frac {4 \, {\left (2 \, a - b\right )} \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}} + \frac {a^{6} - 2 \, a^{5} b - a^{4} b^{2} + 4 \, a^{3} b^{3} - a^{2} b^{4} - 2 \, a b^{5} + b^{6} - \frac {2 \, {\left (a^{6} - 20 \, a^{5} b - 11 \, a^{4} b^{2} - 24 \, a^{3} b^{3} - 29 \, a^{2} b^{4} + 4 \, a b^{5} - b^{6}\right )} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {{\left (a^{6} - 38 \, a^{5} b + 31 \, a^{4} b^{2} - 52 \, a^{3} b^{3} + 63 \, a^{2} b^{4} - 6 \, a b^{5} + b^{6}\right )} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}}{\frac {{\left (a^{9} + a^{8} b - 4 \, a^{7} b^{2} - 4 \, a^{6} b^{3} + 6 \, a^{5} b^{4} + 6 \, a^{4} b^{5} - 4 \, a^{3} b^{6} - 4 \, a^{2} b^{7} + a b^{8} + b^{9}\right )} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {2 \, {\left (a^{9} - a^{8} b - 4 \, a^{7} b^{2} + 4 \, a^{6} b^{3} + 6 \, a^{5} b^{4} - 6 \, a^{4} b^{5} - 4 \, a^{3} b^{6} + 4 \, a^{2} b^{7} + a b^{8} - b^{9}\right )} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {{\left (a^{9} - 3 \, a^{8} b + 8 \, a^{6} b^{3} - 6 \, a^{5} b^{4} - 6 \, a^{4} b^{5} + 8 \, a^{3} b^{6} - 3 \, a b^{8} + b^{9}\right )} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}} + \frac {\sin \left (d x + c\right )^{2}}{{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 1076 vs.
\(2 (223) = 446\).
time = 3.83, size = 1076, normalized size = 4.66 \begin {gather*} \frac {8 \, a^{5} b^{2} + 8 \, a^{3} b^{4} - 16 \, a b^{6} - 2 \, {\left (7 \, a^{6} b - 2 \, a^{4} b^{3} - 5 \, a^{2} b^{5}\right )} \cos \left (d x + c\right )^{3} + 2 \, {\left (a^{7} - 7 \, a^{5} b^{2} - a^{3} b^{4} + 7 \, a b^{6}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (6 \, a^{6} b + a^{4} b^{3} - 8 \, a^{2} b^{5} + b^{7}\right )} \cos \left (d x + c\right ) + 4 \, {\left (a^{5} b^{2} + 8 \, a^{3} b^{4} + 3 \, a b^{6} - {\left (a^{7} + 8 \, a^{5} b^{2} + 3 \, a^{3} b^{4}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (a^{6} b + 8 \, a^{4} b^{3} + 3 \, a^{2} b^{5}\right )} \cos \left (d x + c\right )^{3} + {\left (a^{7} + 7 \, a^{5} b^{2} - 5 \, a^{3} b^{4} - 3 \, a b^{6}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{6} b + 8 \, a^{4} b^{3} + 3 \, a^{2} b^{5}\right )} \cos \left (d x + c\right )\right )} \log \left (a \cos \left (d x + c\right ) + b\right ) - {\left (2 \, a^{5} b^{2} + 9 \, a^{4} b^{3} + 16 \, a^{3} b^{4} + 14 \, a^{2} b^{5} + 6 \, a b^{6} + b^{7} - {\left (2 \, a^{7} + 9 \, a^{6} b + 16 \, a^{5} b^{2} + 14 \, a^{4} b^{3} + 6 \, a^{3} b^{4} + a^{2} b^{5}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (2 \, a^{6} b + 9 \, a^{5} b^{2} + 16 \, a^{4} b^{3} + 14 \, a^{3} b^{4} + 6 \, a^{2} b^{5} + a b^{6}\right )} \cos \left (d x + c\right )^{3} + {\left (2 \, a^{7} + 9 \, a^{6} b + 14 \, a^{5} b^{2} + 5 \, a^{4} b^{3} - 10 \, a^{3} b^{4} - 13 \, a^{2} b^{5} - 6 \, a b^{6} - b^{7}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (2 \, a^{6} b + 9 \, a^{5} b^{2} + 16 \, a^{4} b^{3} + 14 \, a^{3} b^{4} + 6 \, a^{2} b^{5} + a b^{6}\right )} \cos \left (d x + c\right )\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - {\left (2 \, a^{5} b^{2} - 9 \, a^{4} b^{3} + 16 \, a^{3} b^{4} - 14 \, a^{2} b^{5} + 6 \, a b^{6} - b^{7} - {\left (2 \, a^{7} - 9 \, a^{6} b + 16 \, a^{5} b^{2} - 14 \, a^{4} b^{3} + 6 \, a^{3} b^{4} - a^{2} b^{5}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (2 \, a^{6} b - 9 \, a^{5} b^{2} + 16 \, a^{4} b^{3} - 14 \, a^{3} b^{4} + 6 \, a^{2} b^{5} - a b^{6}\right )} \cos \left (d x + c\right )^{3} + {\left (2 \, a^{7} - 9 \, a^{6} b + 14 \, a^{5} b^{2} - 5 \, a^{4} b^{3} - 10 \, a^{3} b^{4} + 13 \, a^{2} b^{5} - 6 \, a b^{6} + b^{7}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left (2 \, a^{6} b - 9 \, a^{5} b^{2} + 16 \, a^{4} b^{3} - 14 \, a^{3} b^{4} + 6 \, a^{2} b^{5} - a b^{6}\right )} \cos \left (d x + c\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{4 \, {\left ({\left (a^{10} - 4 \, a^{8} b^{2} + 6 \, a^{6} b^{4} - 4 \, a^{4} b^{6} + a^{2} b^{8}\right )} d \cos \left (d x + c\right )^{4} + 2 \, {\left (a^{9} b - 4 \, a^{7} b^{3} + 6 \, a^{5} b^{5} - 4 \, a^{3} b^{7} + a b^{9}\right )} d \cos \left (d x + c\right )^{3} - {\left (a^{10} - 5 \, a^{8} b^{2} + 10 \, a^{6} b^{4} - 10 \, a^{4} b^{6} + 5 \, a^{2} b^{8} - b^{10}\right )} d \cos \left (d x + c\right )^{2} - 2 \, {\left (a^{9} b - 4 \, a^{7} b^{3} + 6 \, a^{5} b^{5} - 4 \, a^{3} b^{7} + a b^{9}\right )} d \cos \left (d x + c\right ) - {\left (a^{8} b^{2} - 4 \, a^{6} b^{4} + 6 \, a^{4} b^{6} - 4 \, a^{2} b^{8} + b^{10}\right )} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec {\left (c + d x \right )}}{\left (a \sin {\left (c + d x \right )} + b \tan {\left (c + d x \right )}\right )^{3}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 801 vs.
\(2 (223) = 446\).
time = 0.78, size = 801, normalized size = 3.47 \begin {gather*} \frac {\frac {2 \, {\left (2 \, a - b\right )} \log \left (\frac {{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}} - \frac {8 \, {\left (a^{5} + 8 \, a^{3} b^{2} + 3 \, a b^{4}\right )} \log \left ({\left | -a - b - \frac {a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} \right |}\right )}{a^{8} - 4 \, a^{6} b^{2} + 6 \, a^{4} b^{4} - 4 \, a^{2} b^{6} + b^{8}} + \frac {{\left (a + b - \frac {4 \, a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {2 \, b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}}{{\left (a^{4} + 4 \, a^{3} b + 6 \, a^{2} b^{2} + 4 \, a b^{3} + b^{4}\right )} {\left (\cos \left (d x + c\right ) - 1\right )}} + \frac {\cos \left (d x + c\right ) - 1}{{\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} + \frac {4 \, {\left (3 \, a^{7} - 2 \, a^{6} b + 11 \, a^{5} b^{2} + 28 \, a^{4} b^{3} + 9 \, a^{3} b^{4} + 6 \, a^{2} b^{5} + 9 \, a b^{6} + \frac {6 \, a^{7} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {8 \, a^{6} b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {38 \, a^{5} b^{2} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {4 \, a^{4} b^{3} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {26 \, a^{3} b^{4} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {12 \, a^{2} b^{5} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {18 \, a b^{6} {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} + \frac {3 \, a^{7} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {6 \, a^{6} b {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {27 \, a^{5} b^{2} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {48 \, a^{4} b^{3} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {33 \, a^{3} b^{4} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {18 \, a^{2} b^{5} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {9 \, a b^{6} {\left (\cos \left (d x + c\right ) - 1\right )}^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )}}{{\left (a^{8} - 4 \, a^{6} b^{2} + 6 \, a^{4} b^{4} - 4 \, a^{2} b^{6} + b^{8}\right )} {\left (a + b + \frac {a {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1} - \frac {b {\left (\cos \left (d x + c\right ) - 1\right )}}{\cos \left (d x + c\right ) + 1}\right )}^{2}}}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.12, size = 496, normalized size = 2.15 \begin {gather*} \frac {\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (-a^5+37\,a^4\,b+6\,a^3\,b^2+58\,a^2\,b^3-5\,a\,b^4+b^5\right )}{2\,\left (a+b\right )\,\left (a^2+2\,a\,b+b^2\right )}-\frac {a^3-3\,a^2\,b+3\,a\,b^2-b^3}{2\,\left (a+b\right )}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (a^5-21\,a^4\,b+10\,a^3\,b^2-34\,a^2\,b^3+5\,a\,b^4-b^5\right )}{\left (a-b\right )\,\left (a^2+2\,a\,b+b^2\right )}}{d\,\left (\left (4\,a^5-20\,a^4\,b+40\,a^3\,b^2-40\,a^2\,b^3+20\,a\,b^4-4\,b^5\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\left (-8\,a^5+24\,a^4\,b-16\,a^3\,b^2-16\,a^2\,b^3+24\,a\,b^4-8\,b^5\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\left (4\,a^5-4\,a^4\,b-8\,a^3\,b^2+8\,a^2\,b^3+4\,a\,b^4-4\,b^5\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d\,{\left (a-b\right )}^3}+\frac {\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (2\,a-b\right )}{d\,\left (2\,a^4+8\,a^3\,b+12\,a^2\,b^2+8\,a\,b^3+2\,b^4\right )}-\frac {\ln \left (a+b-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )\,\left (a^5+8\,a^3\,b^2+3\,a\,b^4\right )}{d\,\left (a^8-4\,a^6\,b^2+6\,a^4\,b^4-4\,a^2\,b^6+b^8\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________